package Test.FOURTH.TWO;

import java.awt.*;
import java.util.Calendar;
import java.util.GregorianCalendar;

public class TimeGui {
    public static void main(String[] args) {
        Frame frame=new Frame("时钟");
        frame.setLayout(new GridLayout(3,1));
        frame.setSize(100,300);

        GregorianCalendar gregorianCalendarOne=new GregorianCalendar(Calendar.YEAR,Calendar.MONTH,Calendar.DAY_OF_MONTH,12,23,43);
        GregorianCalendar gregorianCalendarTwo=new GregorianCalendar(Calendar.YEAR,Calendar.MONTH,Calendar.DAY_OF_MONTH,6,34,12);
        GregorianCalendar gregorianCalendarThree=new GregorianCalendar(Calendar.YEAR,Calendar.MONTH,Calendar.DAY_OF_MONTH,18,9,3);

        Label One=new Label(gregorianCalendarOne.get(Calendar.HOUR)+":"+
                gregorianCalendarOne.get(Calendar.MINUTE)+":"+gregorianCalendarOne.get(Calendar.SECOND));
        Label Two=new Label(gregorianCalendarTwo.get(Calendar.HOUR)+":"+
                gregorianCalendarTwo.get(Calendar.MINUTE)+":"+gregorianCalendarTwo.get(Calendar.SECOND));
        Label Three=new Label(gregorianCalendarThree.get(Calendar.HOUR)+":"+
                gregorianCalendarThree.get(Calendar.MINUTE)+":"+gregorianCalendarThree.get(Calendar.SECOND));

        frame.add(One,0);
        frame.add(Two,1);
        frame.add(Three,2);

        frame.validate();
        frame.setVisible(true);

    }
}
